package com.gxuwz.easyschool.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.gxuwz.easyschool.PaymentCodeActivity;
import com.gxuwz.easyschool.R;
import com.gxuwz.easyschool.SystemSettingsActivity;
import com.gxuwz.easyschool.UpdatePasswordActivity;

public class MyFragment extends Fragment {
    private ImageView go_system_settings,go_my_settings;
    public MyFragment getInstance() {
        MyFragment myFragment = new MyFragment();
        return myFragment;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.my_fragement, container, false);
        go_system_settings = view.findViewById(R.id.go_system_settings);
        go_system_settings.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(view.getContext(), UpdatePasswordActivity.class);
                startActivity(intent);
            }
        });
        go_my_settings = view.findViewById(R.id.go_my_settings);
        go_system_settings.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(view.getContext(), SystemSettingsActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }
}
